                <div id="content" class="span10">
                    <!-- content starts -->
                    <div class="row-fluid sortable">
                        <div class="box span12">
                            <div class="box-content">
                                <?php if(!empty($detail)){
                                    foreach ($detail as $row){
                                    ?>
                                <form class="form-horizontal" action="<?php echo base_url();?>kat/update" method="post">
                                  <fieldset>
                                    <legend>Ubah Nama Kategori</legend>
                                    <div class="control-group">
                                      <label class="control-label" for="typeahead">Nama Lama </label>
                                      <div class="controls">
                                        <span type="text" class="span6 typeahead uneditable-input" id="typeahead" name="lama" id="lama"><?=$row['namakat']?></span>
                                        </div>
                                    </div>
                                    <div class="control-group">
                                      <label class="control-label" for="typeahead">Nama Baru </label>
                                      <div class="controls">
                                        <input type="text" class="span6 typeahead" id="typeahead" name="namakat" id="namakat" >
                                        <input type="hidden" class="span6 typeahead" id="typeahead" name="idkategori" id="idkategori" value="<?=$row['idkategori']?>">
                                        </div>
                                    </div>
                                    <div class="form-actions">
                                        <button type="submit" class="btn btn-primary">Submit</button>
                                        <a class="btn" href="<?php echo base_url();?>kat">Cancel</a>
                                    </div>
                                    </fieldset>
                                </form>
                                <?php }}else {?>
                                <form class="form-horizontal" action="<?php echo base_url();?>kat/insert" method="post">
                                  <fieldset>
                                    <legend>Kategori Baru</legend>
                                    <?php if(empty($error)){}else{?>
                                    <div class="alert alert-warning alert-dismissible" role="alert">
                                        <button type="button" class="close" data-dismiss="alert"><span aria-hidden="true">&times;</span><span class="sr-only"></span></button>
                                        <strong>Peringatan!</strong> Nama Kategori sudah ada
                                    </div>
                                    <?php } ?>
                                    <div class="control-group">
                                      <label class="control-label" for="typeahead">Nama Kategori </label>
                                      <div class="controls">
                                        <input type="text" class="span6 typeahead" id="typeahead" name="namakat" id="namakat" >
                                        </div>
                                    </div>
                                    <div class="form-actions">
                                        <button type="submit" class="btn btn-primary">Submit</button>
                                        <button type="reset" class="btn">Cancel</button>
                                    </div>
                                    </fieldset>
                                </form>
                                <?php } ?>
                            </div>
                        </div>
                        <!--/span-->
                    </div>
                    <?php
                    if (empty($kategori)){
                        echo "tidak ada data";
                    } 
                    else {
                    
                    ?>
                    <div class="row-fluid sortable">
                        <div class="box span12">
                            <div class="box-content">
                                <table class="table table-striped table-bordered bootstrap-datatable datatable">
                                    <thead>
                                        <tr>
                                            <th>Nama Kategori</th>
                                            <th>Action</th>
                                        </tr>
                                    </thead>
                                    
                                    <tbody>
                                        <?php
                                    foreach ($kategori as $row) {
                                    ?>
                                        <tr>
                                            <td><?=$row['namakat']?></td>
                                            <td class="center">
                                                <a class="btn btn-info" href="<?php echo base_url()?>kat/edit/<?=$row['idkategori']?>">
                                                    <i class="icon-edit icon-white"></i>  
                                                    Edit                                            
                                                </a>
                                                <a class="btn btn-danger" href="<?php echo base_url()?>kat/delete/<?=$row['idkategori']?>">
                                                    <i class="icon-trash icon-white"></i> 
                                                    Delete
                                                </a>
                                            </td>
                                        </tr>
                                        <?php
                                        } 
                                        ?>
                                    </tbody>
                                </table>
                            </div>
                        </div>
                        <!--/span-->
                    </div>
                    <?php 
                }
                    ?>
                    <!--/row-->
                    <!-- content ends -->
                </div>
                <!--/#content.span10-->